<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>你好</p>
    <div>1</div>
    <div>2</div>
    <div>3</div>
</body>
    <script src="js/jquery-3.7.1.js" type="text/javascript" charset="utf-8"></script>
    <script>
          var arr = $('div').css('border','2px solid red').add($("p"));
          for(var i =0;i<arr.length;i++){
            console.log($(arr[i].html))
          }
    </script>
</html>